<%@page import="com.lynn.salary.entity.Permission"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	String submitUrl = "";
	String inputValue = "";
	ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");
	Permission editP = (Permission)vs.findValue("permission");
	String flag = vs.findString("flag");
	if(flag!=null&&flag.equals("showEditPage")) {
		submitUrl = basePath + "rolePermission!edit.do?flag=update&permission.id="+editP.getId();
		inputValue = editP.getName();
	} else {
		submitUrl = basePath + "rolePermission!save.do";
		inputValue = "";
	}
%>
<div class="pageContent">
	<form method="post" action="<%=submitUrl %>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>权限名:</label>
				<input name="permission.name" type="text" size="30" value="<%=inputValue %>" />
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
